-module(room_sup).
-behaviour(supervisor).

-export([start_link/0]).
-export([init/1]).
-export([start/0]).
-export([add/6]).

%%--------------------------------------------------------------------
start_link() ->
    supervisor:start_link({local, ?MODULE}, ?MODULE, []).

start() ->
    ?MODULE:start_link([]).

init([]) ->
    Children = {room, {room, start_link, []}, temporary, 2000, worker, [room]},
    RestartStrategy = {simple_one_for_one, 10, 10},
    {ok, {RestartStrategy, [Children]}}.
   
%% add(Key,UsrInfoList,NeedUsrInfo,Scene,SceneData) ->
add(Sid,Acc,Req,RoomID,Psw,Seq) ->	
    supervisor:start_child(?MODULE, [{Sid,Acc,Req,RoomID,Psw,Seq}]).

